# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def format_date(date) 
      format = '%Y%m%d_%H%M%S' 
      return date.strftime(format) 
  end; 
  
  
  def authenticated?()
      not session[:user_id].nil?
  end
  
  def current_user
    @current_user ||= User.find(session[:user_id])
  end
end


